package com.masterrabbit.mcslf.exception;


import com.masterrabbit.mcslf.contans.ResultCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class McslfException extends RuntimeException{

//    状态码
    private Integer code;
//    错误信息
    private  String message;
    private ResultCodeEnum resultCodeEnum;

    public McslfException(ResultCodeEnum resultCodeEnum){
        this.code =resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
        this.resultCodeEnum =resultCodeEnum;
    }
}